package com.hytc.mymall.pager;

import android.content.Context;
import android.widget.TextView;

import com.hytc.mymall.R;
import com.hytc.mymall.base.BasePager;
import com.hytc.mymall.bean.HomeInfoBean;
import com.hytc.mymall.utils.BaseTools;


/**
 * Created by Administrator on 2016/12/1.
 */

public class pager4 extends BasePager
{
    private TextView tv_num1;
    private TextView tv_num2;
    private TextView tv_num3;
    private TextView tv_num4;

    public pager4(final Context context, final int n, final HomeInfoBean.HomeInfo homeInfo) {
        super(context, n, homeInfo);
    }

    @Override
    public void initData() {
        super.initData();
        final HomeInfoBean.Home5 home5 = this.homeinfo.home5;
        if (home5 == null) {
            return;
        }
        try {
            this.tv_num1.setText((CharSequence)(String.valueOf(BaseTools.formatMoney(home5.amount)) + "元"));
            this.tv_num2.setText((CharSequence)(home5.memberNum + "人"));
            this.tv_num3.setText((CharSequence)(home5.merchantNum + "家"));
        }
        catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    @Override
    public void initView() {
        super.initView();
        this.tv_num1 = (TextView)this.rootView.findViewById(R.id.tv_page4_num1);
        this.tv_num2 = (TextView)this.rootView.findViewById(R.id.tv_page4_num2);
        this.tv_num3 = (TextView)this.rootView.findViewById(R.id.tv_page4_num3);
    }
}

